using System;
using System.Configuration;

namespace DirectoryWatcher
{
    /// <summary>
    /// Represents a directory that we are to watch for changes, containing a path and a list of 
    /// file sets that we need to watch.
    /// </summary>
    public class DirectoryToWatch : ConfigurationElement
    {
        /// <summary>
        /// Path of the directory where we are to watch for changes.
        /// </summary>
        [ConfigurationProperty("path", IsRequired = true)]
        public string Path
        {
            get
            {
                return (string)base["path"];
            }
        }

        /// <summary>
        /// Collection of file sets that we are to watch for changes.
        /// </summary>
        [ConfigurationProperty("fileSetsToWatch", IsRequired = true)]
        public FileSetToWatchCollection FileSetsToWatch
        {
            get
            {
                return (FileSetToWatchCollection)base["fileSetsToWatch"];
            }
        }
    }
}
